<form action="{:url()}" method="post" class="form_single">
  <div class="box" style="width:90%;margin: 0 auto;margin-bottom: 60px">
    <style type="text/css">
      .rows{
        height:40px;
        line-height:40px;
        width:100%;
        border-bottom:2px solid #6cbae7;
        font-size:20px;
        margin: 10px;
        padding-left: 10px;
        margin-bottom: 20px;
      }
      .staff_add{
        width: 100%;
    height: 50px;
    line-height: 50px;
    font-size: 14px;
    color: #19AA8D;
    text-align: center;
    cursor: pointer;
    background: #EAF8F5;
    border: 1px dashed #B0DDD4;
      }
      .bj_del{
        text-align: right;
    padding: 5px;
    padding-right: 30px;
      }
    </style>
    <div class="box-body">
      <div class="rows">
        <i class="fa fa-user" style="color:#3c8dbc;"></i>基础信息
      </div>
      <div class="row">
        <div class="col-md-4">
          <div class="form-group">
            <label>入职公司</label>
            <span class="">（员工入职公司）</span>
              <select name="company_id" class="form-control" id="company_list" required="required">
                <option value="" >请选择公司</option>
                  {volist name='company_list' id='vo'}
                      <option value="{$vo['id']}" >{$vo['name']}</option>
                  {/volist}
              </select>
          </div>
        </div>
        <div class="col-md-4">
          <div class="form-group">
            <label>入职部门</label>
            <span class="">（员工入职部门）</span>
              <select name="branch_id" class="form-control" id="branch_list" required="required">
                <option value="" >请选择部门</option>
                  <!-- {volist name='branch_list' id='vo'}
                      <option value="{$vo['id']}" >{$vo['branch_name']}</option>
                  {/volist} -->
              </select>
          </div>
        </div>
        <div class="col-md-4">
          <div class="form-group">
            <label>所属组</label>
            <span class="">（员工所属部门组非必选）</span>
              <select name="group_id" class="form-control" id="group_list">
                  <option value="6" >请选择组</option>
                  <!-- {volist name='group_list' id='vo'}
                      <option value="{$vo['id']}" >{$vo['group_name']}</option>
                  {/volist} -->
              </select>
          </div>
        </div>

        <div class="col-md-4">
          <div class="form-group">
            <label>入职岗位</label>
            <span>（员工入职岗位）</span>
            <input class="form-control" name="position" placeholder="请输入入职岗位" type="text" >
          </div>
        </div>

       <!--  <div class="col-md-4">
          <div class="form-group">
            <label>岗位等级</label>
            <span>（员工岗位等级）</span>
            <select name="position_type" class="form-control">
                  <option value="0" >请选择</option>
                  <option value="1" >高级</option>
                  <option value="2" >初级</option>
              </select>
          </div>
        </div>

        <div class="col-md-4">
          <div class="form-group">
            <label>是否内部推荐</label>
            <span>（员工是否内推）</span>
            <select name="inter_status" class="form-control">
             <option value="0" >否</option> 
             <option value="1" >是</option>  
            </select>
          </div>
        </div>

        <div class="col-md-4">
          <div class="form-group">
            <label>推荐人姓名</label>
            <span>（员工推荐人）</span>
            <input class="form-control" name="inter_name" placeholder="请输入姓名" type="text" >
          </div>
        </div>
 -->
        <div class="col-md-4">
          <div class="form-group">
            <label>入职时间</label>
            <span class="">（员工入职时间）</span>
              <input type="text" name="entry_time" readonly="readonly" style="cursor:pointer"  class="form-control test-item" placeholder="请选择时间" >
          </div>
        </div>

        <div class="col-md-4">
          <div class="form-group">
            <label>转正时间</label>
            <span class="">（员工转正时间）</span>
              <input type="text" name="positive_time" readonly="readonly" style="cursor:pointer"  class="form-control test-item" placeholder="请选择时间" >
          </div>
        </div>

        <div class="col-md-4">
          <div class="form-group">
            <label>姓名</label>
            <span>（员工姓名）</span>
            <input class="form-control" name="staff_name" placeholder="请输入姓名" type="text" required="required">
          </div>
        </div>

        <div class="col-md-4">
          <div class="form-group">
            <label>邮箱</label>
            <span>（员工邮箱）</span>
            <input class="form-control" name="email" placeholder="请输入邮箱" type="text" >
          </div>
        </div>

        <div class="col-md-4">
          <div class="form-group">
            <label>姓别</label>
            <span>（员工姓别）</span>
            <select name="sex" class="form-control">
                  <option value="1" >男</option>
                  <option value="2" >女</option>
              </select>
          </div>
        </div>

        <div class="col-md-4">
          <div class="form-group">
            <label>生日</label>
            <span>（员工生日）</span>
             <input type="text" name="birthday" readonly="readonly" style="cursor:pointer"  class="form-control test-item" placeholder="请选择时间" >
          </div>
        </div>

        <div class="col-md-4">
          <div class="form-group">
            <label>民族</label>
            <span>（员工民族）</span>
            <input class="form-control" name="ethnic" placeholder="请输入民族" type="text" >
          </div>
        </div>

        <div class="col-md-4">
          <div class="form-group">
            <label>政治面貌</label>
            <span>（员工政治面貌）</span>
            <input class="form-control" name="politics" placeholder="请输入政治面貌" type="text" >
          </div>
        </div>

        <div class="col-md-4">
          <div class="form-group">
            <label>身高/体重</label>
            <span>（员工身高/体重）</span>
            <input class="form-control" name="height_weight" placeholder="请输入身高/体重" type="text" >
          </div>
        </div>

        <div class="col-md-4">
          <div class="form-group">
            <label>婚 否</label>
            <span>（员工婚否）</span>
            <select name="marry_status" class="form-control">
              <option value="1" >已婚</option>
              <option value="2" >未婚</option>
            </select>
          </div>
        </div>

       <!--  <div class="col-md-4">
          <div class="form-group">
            <label>参加工作时间</label>
            <span class="">（员工参加工作时间）</span>
              <input type="text" name="worker_time" readonly="readonly" style="cursor:pointer"  class="form-control test-item" placeholder="请选择时间" >
          </div>
        </div> -->

        <div class="col-md-4">
          <div class="form-group">
            <label>户籍类型</label>
            <span>（户籍类型）</span>
            <select name="census_type" class="form-control">
              <option value="1" >农村户口</option>
              <option value="2" >城镇户口</option>
              <option value="3" >外埠城镇</option>
              <option value="4" >外埠农村</option>
            </select>
          </div>
        </div>

        <!-- <div class="col-md-4">
          <div class="form-group">
            <label style="width:100%">户口所在地<span>（员工户口所在地）</span></label>
            <select id="s_province" name="census_province" class="form-control" style="width:50%;float: left"></select>    
            <select id="s_city" name="census_city" class="form-control" style="width:50%;float: left"></select> 
            <script type="text/javascript">_init_area();</script> 
          </div>
        </div> -->

        <div class="col-md-4">
          <div class="form-group">
            <label>身份证号</label>
            <span>（员工身份证号）</span>
            <input class="form-control" name="card_id" placeholder="请输入身份证号" type="text">
          </div>
        </div>

        <div class="col-md-4">
          <div class="form-group">
            <label>手机号</label>
            <span>（员工手机号）</span>
            <input class="form-control" name="phones" placeholder="请输入手机号" type="text">
          </div>
        </div>

        <div class="col-md-4">
          <div class="form-group">
            <label>工资卡</label>
            <span>（员工工资卡号）</span>
             <input type="text" name="pay_id" style="cursor:pointer"  class="form-control" placeholder="请输入卡号" >
          </div>
        </div>

        <div class="col-md-4">
          <div class="form-group">
            <label>银行名</label>
            <span>（员工工资卡号所属银行）</span>
             <input type="text" name="pay_name" style="cursor:pointer"  class="form-control" placeholder="请输入银行名" >
          </div>
        </div>

        <div class="col-md-4">
          <div class="form-group">
            <label>身份证地址</label>
            <span>（员工身份证地址）</span>
            <input class="form-control" name="car_place" placeholder="请输入身份证地址" type="text">
          </div>
        </div>

        <div class="col-md-4">
          <div class="form-group">
            <label>现住地址</label>
            <span>（员工现住地址）</span>
            <input class="form-control" name="xz_place" placeholder="请输入现住地址" type="text">
          </div>
        </div>

        <div class="col-md-6" style="margin-bottom: 15px">
          <div class="form-group">
            <label style="width:100%">试用期薪资<span>（基本工资+全勤+绩效+社保补贴+持证补贴+其他补贴+其他）</span></label>
            <input class="form-control" style="width:14.28%;float: left" name="probationpay1" placeholder="基本工资" type="text">
            <input class="form-control" style="width:14.28%;float: left" name="probationpay2" placeholder="全勤" type="text">
            <input class="form-control" style="width:14.28%;float: left" name="probationpay3" placeholder="绩效" type="text">
            <input class="form-control" style="width:14.28%;float: left" name="probationpay4" placeholder="社保补贴" type="text">
            <input class="form-control" style="width:14.28%;float: left" name="probationpay5" placeholder="持证补贴" type="text">
            <input class="form-control" style="width:14.28%;float: left" name="probationpay6" placeholder="其他补贴" type="text">
            <input class="form-control" style="width:14.28%;float: left" name="probationpay7" placeholder="其它" type="text">
          </div>
        </div>

        <div class="col-md-6" style="margin-bottom: 15px">
          <div class="form-group">
            <label style="width:100%">转正薪资<span>（基本工资+全勤+绩效+社保补贴+持证补贴+其他补贴+其他）</span></label>
            <input class="form-control" style="width:14.28%;float: left" name="positivepay1" placeholder="基本工资" type="text">
            <input class="form-control" style="width:14.28%;float: left" name="positivepay2" placeholder="全勤" type="text">
            <input class="form-control" style="width:14.28%;float: left" name="positivepay3" placeholder="绩效" type="text">
            <input class="form-control" style="width:14.28%;float: left" name="positivepay4" placeholder="社保补贴" type="text">
            <input class="form-control" style="width:14.28%;float: left" name="positivepay5" placeholder="持证补贴" type="text">
            <input class="form-control" style="width:14.28%;float: left" name="positivepay6" placeholder="其他补贴" type="text">
            <input class="form-control" style="width:14.28%;float: left" name="positivepay7" placeholder="其它" type="text">
          </div>
        </div>

        <div class="col-md-6">
          <div class="form-group">
            <label>员工图片</label>
            <span class="">（请上传单张员工图片）</span>
            <br/>
            {assign name="img_id" value="$info.img_id|default='0'" /}
            {:widget('file/index', ['name' => 'img_id', 'value' => $img_id, 'type' => 'img'])}
          </div>
        </div>


      </div>

    </div>
    <div class="box-body ">
      <div class="rows">
        <i class="fa fa-file-text-o" style="color:#3c8dbc;"></i>合同信息
      </div>
      <div class="row">
        <div class="col-md-4">
          <div class="form-group">
            <label>合同生效时间</label>
            <span class="">（合同生效时间）</span>
              <input type="text" name="ht_start" readonly="readonly" style="cursor:pointer"  class="form-control test-item" placeholder="请选择时间" >
          </div>
        </div>

        <div class="col-md-4">
          <div class="form-group">
            <label>合同终止时间</label>
            <span class="">（合同终止时间）</span>
              <input type="text" name="ht_end" readonly="readonly" style="cursor:pointer"  class="form-control test-item" placeholder="请选择时间" >
          </div>
        </div>

        <div class="col-md-4">
          <div class="form-group">
            <label>合同期限</label>
            <span class="">（合同期限）</span>
             <input class="form-control" name="ht_time" placeholder="请输入合同期限" type="text">
          </div>
        </div>
      </div>
    </div>
    <div class="box-body ">
      <div class="rows">
        <i class="fa fa-phone" style="color:#3c8dbc;"></i>紧急联系方式
      </div>
      <div class="row">
        <div class="col-md-4">
          <div class="form-group">
            <label>与本人关系</label>
            <span>（联系人与本人关系）</span>
            <input class="form-control" name="jj_gx" placeholder="请输入与本人关系" type="text">
          </div>
        </div>

        <div class="col-md-4">
          <div class="form-group">
            <label>姓名</label>
            <span>（联系人姓名）</span>
            <input class="form-control" name="jj_name" placeholder="请输入姓名" type="text">
          </div>
        </div>

        <div class="col-md-4">
          <div class="form-group">
            <label>电话</label>
            <span class="">（联系人电话）</span>
             <input class="form-control" name="jj_phone" placeholder="请输入电话" type="text">
          </div>
        </div>
      </div>
    </div>
    <div class="box-body">
      <div class="rows">
        <i class="fa fa-graduation-cap" style="color:#3c8dbc;"></i>教育背景(最高学历)
      </div>
      <div class="row">
        <div class="col-md-4">
          <div class="form-group">
            <label>毕业学校</label>
            <span>（毕业学校）</span>
            <input class="form-control" name="school" placeholder="请输入毕业学校" type="text">
          </div>
        </div>

        <div class="col-md-4">
          <div class="form-group">
            <label>学历</label>
            <span>（最高学历）</span>
            <input class="form-control" name="education" placeholder="请输入学历" type="text">
          </div>
        </div>

        <div class="col-md-4">
          <div class="form-group">
            <label>专业</label>
            <span class="">（专业）</span>
             <input class="form-control" name="major" placeholder="请输入专业" type="text">
          </div>
        </div>
        <div class="col-md-4">
          <div class="form-group">
            <label>毕业时间</label>
            <span>（毕业时间）</span>
            <input readonly="readonly" style="cursor:pointer"  class="form-control test-item" placeholder="请选择时间" name="graduation" type="text">
          </div>
        </div>

        <div class="col-md-4">
          <div class="form-group">
            <label>职业资格名称</label>
            <span>（最高职业资格名称）</span>
            <input class="form-control" name="occupational" placeholder="请输入职业资格名称" type="text">
          </div>
        </div>

        <div class="col-md-4">
          <div class="form-group">
            <label>职业资格等级</label>
            <span class="">（职业资格等级）</span>
             <input class="form-control" name="occupational_type" placeholder="请输入职业资格等级" type="text">
          </div>
        </div>

      </div>
      <!-- <div class="staff_school_add staff_add"><i class="fa fa-plus"></i>添加教育背景</div> -->
    </div>
    <div class="box-body">
      <div class="rows">
        <i class="fa fa-product-hunt" style="color:#3c8dbc;"></i>培训经历
      </div>
      <div class="staff_train">
      </div>
      <div class="staff_train_add staff_add"><i class="fa fa-plus"></i>添加培训经历</div>
    </div>
     <div class="box-body">
      <div class="rows">
        <i class="fa fa-won" style="color:#3c8dbc;"></i>工作经历
      </div>
      <div class="staff_work">
      </div>
      <div class="staff_work_add staff_add"><i class="fa fa-plus"></i>添加工作经历</div>
    </div>
    <!--  <div class="box-body">
      <div class="rows">
        <i class="fa fa-user-secret" style="color:#3c8dbc;"></i>直系亲属
      </div>
      <div class="staff_clan">
      </div>
      <div class="staff_clan_add staff_add"><i class="fa fa-plus"></i>添加直系亲属</div>
    </div> -->
    <div class="box-body">
      <div class="rows">
        <i class="fa fa-modx" style="color:#3c8dbc;"></i>员工轨迹
      </div>
      <div class="staff_child">
      </div>
      <div class="staff_child_add staff_add"><i class="fa fa-plus"></i>添加员工轨迹</div>
    </div>

   

  </div>
  <div class="box-footer" style="position: fixed;
    bottom: 0px;
    width: 100%;
    text-align: center;
    padding-right: 250px;">
    <button  type="submit" class="btn ladda-button ajax-post" data-style="slide-up" target-form="form_single">
    <span class="ladda-label"><i class="fa fa-send"></i> 确 定</span>
    </button>
    <a class="btn" onclick="javascript:history.back(-1);return false;"><i class="fa fa-history"></i> 返 回</a>
  </div>
  <script src="__STATIC__/module/admin/laydate/laydate.js"></script>
  <script type="text/javascript">
    $('#company_list').change(function(){
    var options=$(this).children("option:selected");
     // options.attr('selected','selected'); 
    var company_id=options.val();
    $('#branch_list option').remove();
    $('#group_list option').remove();
     $("#group_list").append("<option value='6'>请选择组名</option>");
     $("#branch_list").append("<option value=''>请选择部门名</option>");
    $.post('/admin/branch/branchlist',{company_id:company_id},function(data){
      $(data.data).each(function(index,item){ 
          var option="<option value="+item.id+">"+item.branch_name+"</option>"
          $("#branch_list").append(option);  
            // console.log(item); 
        }); 
    });  
  })

  $('#branch_list').change(function(){
    var options=$(this).children("option:selected");
     options.attr('selected','selected'); 
    var branch_id=options.val();
    $('#group_list option').remove();
     $("#group_list").append("<option value='6'>请选择组名</option>");
    // alert(branch_id);
    $.post('/admin/group/grouplist',{branch_id:branch_id},function(data){
      $(data.data).each(function(index,item){ 
          var option="<option value="+item.id+">"+item.group_name+"</option>"
          $("#group_list").append(option);  
            console.log(item); 
        }); 
    });  
  })
    // 时间插件
    $('body').delegate('.test-item','click', function(){
    lay('.test-item').each(function(){
    laydate.render({
      elem: this
      ,trigger: 'click'
    });
 });
  });
    //添加教育经历
  // $('.staff_school_add').click(function(){
  //   var jd= '<div class="row schoolrow"><div class="bj_del"><a class="btn schoolDel"  style="padding:2px 5px"  href="javascript:void(0)"><i class="fa fa-trash-o"></i> 删 除</a></div><div class="col-md-4"><div class="form-group"><label>学校</label><span>（学校名）</span><input class="form-control" name="s_school[]" required= "required" placeholder="请输入学校名" type="text"></div></div><div class="col-md-4"><div class="form-group"><label>入校时间</label><span>（入校时间）</span><input type="text" name="s_start_time[]" readonly="readonly" style="cursor:pointer"  class="form-control test-item" placeholder="请选择时间" ></div></div><div class="col-md-4"><div class="form-group"><label>结业时间</label><span class="">（结业时间）</span><input type="text" name="s_end_time[]" readonly="readonly" style="cursor:pointer"  class="form-control test-item" placeholder="请选择时间" ></div></div><div class="col-md-4"><div class="form-group"><label>专业</label><span>（专业）</span><input class="form-control" name="s_major[]" placeholder="请输入专业" type="text"></div></div><div class="col-md-4"><div class="form-group"><label>学历</label><span>（学历）</span><input class="form-control" name="s_education[]" placeholder="请输入学历" type="text"></div></div><div class="col-md-4"><div class="form-group"><label>学位</label><span>（学位）</span><input class="form-control" name="s_degree[]" placeholder="请输入学位" type="text"></div></div></div></div>'

  //   $('.staff_school').append(jd);
  // })

  // $('body').delegate('.schoolDel','click', function(){
  //   var index=$(this).index('.schoolDel');

  //   $('.schoolrow').eq(index).remove();
  // });


//添加培训经历
  $('.staff_train_add').click(function(){
    var jd= '<div class="row trainrow"><div class="bj_del"><a class="btn trainDel"  style="padding:2px 5px"  href="javascript:void(0)"><i class="fa fa-trash-o"></i> 删 除</a></div><div class="col-md-4"><div class="form-group"><label>培训机构</label><span>（培训机构名）</span><input class="form-control" name="t_name[]" required= "required" placeholder="请输入培训机构名" type="text"></div></div><div class="col-md-4"><div class="form-group"><label>入校时间</label><span>（入校时间）</span><input type="text" name="t_start_time[]" readonly="readonly" style="cursor:pointer"  class="form-control test-item" placeholder="请选择时间" ></div></div><div class="col-md-4"><div class="form-group"><label>结业时间</label><span class="">（结业时间）</span><input type="text" name="t_end_time[]" readonly="readonly" style="cursor:pointer"  class="form-control test-item" placeholder="请选择时间" ></div></div><div class="col-md-8"><div class="form-group"><label>培训内容</label><span>（培训内容）</span><input class="form-control" name="t_content[]" placeholder="请输入培训内容" type="text"></div></div><div class="col-md-4"><div class="form-group"><label>证书</label><span>（证书）</span><input class="form-control" name="t_certificate[]" placeholder="请输入证书" type="text"></div></div></div>'

    $('.staff_train').append(jd);
  })

  $('.staff_train').delegate('.trainDel','click', function(e){
    e.stopPropagation();
    var index=$(this).index('.trainDel');
    console.log(index);
    $('.trainrow').eq(index).remove();
  });

  //添加工作经历
  $('.staff_work_add').click(function(){
    var jd= '<div class="row workrow"><div class="bj_del"><a class="btn workDel"  style="padding:2px 5px"  href="javascript:void(0)"><i class="fa fa-trash-o"></i> 删 除</a></div><div class="col-md-4"><div class="form-group"><label>工作单位</label><span>（工作单位名）</span><input class="form-control" name="w_name[]" required= "required" placeholder="请输入工作单位名" type="text"></div></div><div class="col-md-4"><div class="form-group"><label>开始时间</label><span>（开始时间）</span><input type="text" name="w_start_time[]" readonly="readonly" style="cursor:pointer"  class="form-control test-item" placeholder="请选择时间" ></div></div><div class="col-md-4"><div class="form-group"><label>结束时间</label><span class="">（结束时间）</span><input type="text" name="w_end_time[]" readonly="readonly" style="cursor:pointer"  class="form-control test-item" placeholder="请选择时间" ></div></div><div class="col-md-4"><div class="form-group"><label>已任职位</label><span>（已任职位）</span><input class="form-control" name="w_duty[]" placeholder="请输入已任职位" type="text"></div></div><div class="col-md-4"><div class="form-group"><label>证明人</label><span>（证明人）</span><input class="form-control" name="w_peson[]" placeholder="请输入证明人" type="text"></div></div><div class="col-md-4"><div class="form-group"><label>薪酬待遇</label><span>（薪酬待遇）</span><input class="form-control" name="w_payment[]" placeholder="请输入薪酬待遇" type="text"></div></div></div></div>'

    $('.staff_work').append(jd);
  })

  $('.staff_work').delegate('.workDel','click', function(e){
    e.stopPropagation();
    var index=$(this).index('.workDel');
    $('.workrow').eq(index).remove();
  });

  // //添加直系亲属
  // $('.staff_clan_add').click(function(){
  //   var jd= '<div class="row clanrow"><div class="bj_del"><a class="btn clanDel"  style="padding:2px 5px"  href="javascript:void(0)"><i class="fa fa-trash-o"></i> 删 除</a></div><div class="col-md-4"><div class="form-group"><label>姓名</label><span>（姓名）</span><input class="form-control" name="c_name[]" required= "required" placeholder="请输入姓名" type="text"></div></div><div class="col-md-4"><div class="form-group"><label>关系</label><span>（关系）</span><input type="text" name="c_relation[]" class="form-control" placeholder="请输入与本人关系" ></div></div><div class="col-md-4"><div class="form-group"><label>年龄</label><span>（年龄）</span><input type="text" name="c_age[]" class="form-control" placeholder="请输入年龄" ></div></div><div class="col-md-4"><div class="form-group"><label>工作单位</label><span>（工作单位）</span><input class="form-control" name="c_woke_name[]" placeholder="请输入工作单位" type="text"></div></div><div class="col-md-4"><div class="form-group"><label>职务</label><span>（职务）</span><input class="form-control" name="c_duty[]" placeholder="请输入职务" type="text"></div></div><div class="col-md-4"><div class="form-group"><label>电话</label><span>（电话）</span><input class="form-control" name="c_phone[]" placeholder="请输入电话" type="text"></div></div></div></div>'

  //   $('.staff_clan').append(jd);
  // })

  // $('body').delegate('.clanDel','click', function(){
  //   var index=$(this).index('.clanDel');
  //   $('.clanrow').eq(index).remove();
  // });

  //添加自定义备注
  $('.staff_child_add').click(function(){
    var jd= '<div class="row childrow"><div class="bj_del"><a class="btn childDel"  style="padding:2px 5px"  href="javascript:void(0)"><i class="fa fa-trash-o"></i> 删 除</a></div><div class="col-md-3"><div class="form-group"><label>时间</label><span>（时间）</span><input type="text" name="ch_time[]" readonly="readonly" style="cursor:pointer"  class="form-control test-item" placeholder="请选择时间" ></div></div><div class="col-md-3"><div class="form-group"><label>名称</label><span>（名称）</span><input class="form-control" name="ch_name[]" required= "required" placeholder="请输入名称" type="text"></div></div><div class="col-md-6"><div class="form-group"><label>内容</label><span>（内容）</span><input class="form-control" name="ch_content[]" placeholder="请输入内容" type="text"></div></div></div></div>'

    $('.staff_child').append(jd);
  })

  $('.staff_child').delegate('.childDel','click', function(e){
    e.stopPropagation();
    var index=$(this).index('.childDel');
    $('.childrow').eq(index).remove();
  });
  </script>
  
</form>
